package controller

import (
	"github.com/crack007/go-im/src/common/constant"
	"github.com/crack007/go-im/src/common/model"
	"github.com/gin-gonic/gin"
)

func GetRequestUser(ctx *gin.Context) *model.UserModel {
	user, _ := ctx.Get(constant.REQUEST_USER)
	var userModel *model.UserModel
	if v, ok := user.(*model.UserModel); ok {
		userModel = v
	}
	return userModel
}
